package com.china08.yxyapi.entity.mg.lessons;

import javax.persistence.Id;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * 课程系统: 用户观看历史表.</br>
 * APP开发过程中需要
 * 
 * @author Richard.Wang
 * 
 */
@SuppressWarnings("serial")
@Document(collection = "yxy.lessons.user.history")
public class YxyLessonsUserHistory extends MongoBaseEntityNoId {

	/**
	 * // 使用用户id+lessonsID进行拼接为id(例如:3433434_34343434)</br>
	 * 每一个用户只保存一个课程下的 课时学习记录.
	 */
	@Id
	private String id;

	/**
	 * 用户ID
	 */
	@Indexed
	@Field(value = "user_id")
	private String userId;

	/**
	 * 课程ID
	 */
	@Indexed
	@Field(value = "lessons_id")
	private String lessonsId;

	/**
	 * 课程类型: 0-同步课程,1-专题课程,2-校本课程
	 */
	@Field(value = "lessons_type")
	private Integer lessonsType;

	/**
	 * 观看的课时id.
	 */
	@Field(value = "lessons_item_id")
	private String lessonsItemId;

	/** 视频文件最后看的时长 , 秒 */
	@Field(value = "last_time")
	private Integer last_time = 0;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getLessonsId() {
		return lessonsId;
	}

	public void setLessonsId(String lessonsId) {
		this.lessonsId = lessonsId;
	}

	public Integer getLessonsType() {
		return lessonsType;
	}

	public void setLessonsType(Integer lessonsType) {
		this.lessonsType = lessonsType;
	}

	public String getLessonsItemId() {
		return lessonsItemId;
	}

	public void setLessonsItemId(String lessonsItemId) {
		this.lessonsItemId = lessonsItemId;
	}

	public Integer getLast_time() {
		return last_time;
	}

	public void setLast_time(Integer last_time) {
		this.last_time = last_time;
	}

}
